/*
 * XML Type:  bookType
 * Namespace: http://jugbrescia.dev.java.net/library
 * Java type: net.java.dev.jugbrescia.library.BookType
 *
 * Automatically generated - do not modify.
 */
package net.java.dev.jugbrescia.library.impl;
/**
 * An XML bookType(@http://jugbrescia.dev.java.net/library).
 *
 * This is a complex type.
 */
public class BookTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.java.dev.jugbrescia.library.BookType
{
    
    public BookTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName AUTHORS$0 = 
        new javax.xml.namespace.QName("", "authors");
    private static final javax.xml.namespace.QName TITLE$2 = 
        new javax.xml.namespace.QName("", "title");
    
    
    /**
     * Gets the "authors" element
     */
    public net.java.dev.jugbrescia.library.AuthorsType getAuthors()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.AuthorsType target = null;
            target = (net.java.dev.jugbrescia.library.AuthorsType)get_store().find_element_user(AUTHORS$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "authors" element
     */
    public void setAuthors(net.java.dev.jugbrescia.library.AuthorsType authors)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.AuthorsType target = null;
            target = (net.java.dev.jugbrescia.library.AuthorsType)get_store().find_element_user(AUTHORS$0, 0);
            if (target == null)
            {
                target = (net.java.dev.jugbrescia.library.AuthorsType)get_store().add_element_user(AUTHORS$0);
            }
            target.set(authors);
        }
    }
    
    /**
     * Appends and returns a new empty "authors" element
     */
    public net.java.dev.jugbrescia.library.AuthorsType addNewAuthors()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.java.dev.jugbrescia.library.AuthorsType target = null;
            target = (net.java.dev.jugbrescia.library.AuthorsType)get_store().add_element_user(AUTHORS$0);
            return target;
        }
    }
    
    /**
     * Gets the "title" attribute
     */
    public java.lang.String getTitle()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TITLE$2);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "title" attribute
     */
    public org.apache.xmlbeans.XmlString xgetTitle()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TITLE$2);
            return target;
        }
    }
    
    /**
     * True if has "title" attribute
     */
    public boolean isSetTitle()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(TITLE$2) != null;
        }
    }
    
    /**
     * Sets the "title" attribute
     */
    public void setTitle(java.lang.String title)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TITLE$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TITLE$2);
            }
            target.setStringValue(title);
        }
    }
    
    /**
     * Sets (as xml) the "title" attribute
     */
    public void xsetTitle(org.apache.xmlbeans.XmlString title)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TITLE$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(TITLE$2);
            }
            target.set(title);
        }
    }
    
    /**
     * Unsets the "title" attribute
     */
    public void unsetTitle()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(TITLE$2);
        }
    }
}
